
public class Pokemon {
	int level, baseHP, HPModifier, maxHP, currentHP;
	String name, type, conditions[];
	Pokemon(String myType, String myName, int myBaseHP, int myHPModifier, int myLevel){
		level = myLevel;
		baseHP = myBaseHP;
		type = myType;
		name = myName;
		HPModifier = myHPModifier;
		maxHP = baseHP + HPModifier * level;
	}
	public String getType(){
		return type;
	}
	public String getName(){
		return name;
	}
	public void setLevel(int newLevel){
		level = newLevel;
		maxHP = baseHP + HPModifier * level;
	}
	public void setCurrentHP(int hp){
		currentHP = hp;
	}
	public int getLevel(){
		return level;
	}
	public int getBaseHp(){
		return baseHP;
	}
	public int getHpModifier(){
		return HPModifier;
	}
	/**
	 * adds a condition to the bottom of the array.
	 * @param newCondition
	 */
	public void addCondition(String newCondition){
		String[] temp = new String[conditions.length + 1];
		for (int i = 0; i < conditions.length; i++){
			temp[i] = conditions[i];
		}
		temp[temp.length - 1] = newCondition;
		conditions = temp;
	}
	/**
	 * returns false if theCondition isn't there, otherwise, removes the condition
	 * and returns true.
	 **/
	public boolean removeCondition(String theCondition){
		int position = -1;
		for (int i = 0; i < conditions.length; i++){
			if (conditions[i].equals(theCondition)){
				position = i;
			}
		}
		if (position == -1){
			return false;
		}
		else{
			String temp[] = new String[conditions.length - 1];
			for (int i = 0; i < conditions.length; i++){
				if (position == i);
				else if (i < position){
					temp[i] = conditions[i];
				}
				else{
					temp[i - 1] = conditions[i];
				}
			}
			return true;
		}
	}
	public void removeAllConditions(){
		conditions = null;
	}
	public String[] getConditions(){
		return conditions;
	}
}
